<script setup lang="ts">
import ButtonGroup from '@/components/EditItems/ButtonGroup.vue'
import type { VueComType } from '@/types'
import { inject ,ref} from 'vue'
import { EditorType, EditorTypeText } from '@/constants'
const props = defineProps<{
  status: string;
  isShow: boolean;
  configKey: EditorType;
  editCom: VueComType;
}>();

const updateStatus = inject('updateStatus');

const text = ref(props.status)
const inputHandle = (color: string) => {
  updateStatus(props.configKey, color)
}

</script>

<template>
  <div class="size-editor">
    <button-group :title="EditorTypeText[configKey]" :description="text">
      <el-color-picker v-model="text" @update:modelValue="inputHandle" />
    </button-group>
  </div>
</template>

<style scoped lang="scss">

</style>
